//《运维》
import api from './api'


// 查询工单
const reqWorksList = (data) => {
	return api.post('/workorders/page', data)
}

// 查询工单模版
const reqWorkTemplateList = (data) => {
	return api.post('/workorder/templates/page', data)
}

//提交工单
const reqSubmitWorkTemplate = (data) => {
	return api.post('/workorders', data)
}
//工单详情
const reqOrderDetail = (id) => {
	return api.get(`/workorders/${id}`)
}

// 查询计划列表
const reqPlanList = (data) => {
	return api.post('/workorder/plans/page', data)
}

// 查询计划详情
const reqPlanDetail = (id) => {
	return api.get(`/workorder/plans/${id}`)
}

//处理表单
const reqOperateOrder = (data) => {
	return api.post('/workorders/disposal', data)
}
//保存工单报告
const reqSaveOrderReport = (data) => {
	return api.put('/workorders/disposal/report', data)
}







export {
	reqWorksList,
	reqPlanList,
	reqOrderDetail,
	reqPlanDetail,
	reqOperateOrder,
	reqSaveOrderReport,
	reqWorkTemplateList,
	reqSubmitWorkTemplate
}